[QEMU] Clear TD status field explicitly when it's fetched.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:44:32 +0000 (10:44 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:44:32 +0000 (10:44 +0000)
commit539471abbe963a630e919fe8665bce089f50f504
treea4aef23bbbb7b7de1fe4c437b1f559dde2afafee
parentd32128e96e84b8ce93bcf6ceccc4437a8e389ff7
[QEMU] Clear TD status field explicitly when it's fetched.

In current Qemu-dm, UHC will set some status bits of TD in status
updating stage, but never process the status bit if relevant condition
does not occur, leaving it as it is. When a TD is fetched with some
status bits are set to 1, it will return to Guest OS with these bits
set to 1 even this TD is executed successfully. Some Windows OS,
e.g. Windows 2000, will check status bits of TD in UHC interrupt
routine, treat it as a unsuccessful one if some status bits are set to
1 and discard the data. Other Windows OS just check USBSTS of UHC,
ignoring status field of TD unless the value of USBSTS indicates
occurrence of error.

With this patch, USB mouse/tablet in Windows 2000 works correctly.

Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
tools/ioemu/hw/usb-uhci.c